package com.yhd.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 课程信息主表
 */
@Data
public class TCourse implements Serializable {
    /**
     * 主键
     */
    @Id
    @Column(name = "ID")
    @KeySql(useGeneratedKeys = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "jdbc")
    private Integer id;

    /**
     * 名字
     */
    @Column(name = "name")
    private String name;

    /**
     * 简介
     */
    @Column(name = "title")
    private String title;

    /**
     * 封面
     */
    @Column(name = "cover")
    private String cover;

    /**
     * 图片介绍 逗号隔开
     */
    @Column(name = "imgs")
    private String imgs;

    /**
     * 类型 activity:活动，course:课程
     */
    @Column(name = "type")
    private String type;
    /**
     * 客服信息
     */
    @Column(name = "customerSer")
    private String customerSer;
    /**
     * 价格
     */
    @Column(name = "price")
    private BigDecimal price;
    /**
     * 状态 1:生效 0:未生效 2:下架
     */
    @Column(name = "status")
    private Integer status;
    /**
     * 限制的学员数量
     */
    @Column(name = "limitStuNum")
    private Integer limitStuNum;

    /**
     * 是否支持预约 1:是 0:否
     */
    @Column(name = "isReservation")
    private Integer isReservation;

    /**
     * 购买渠道 0:不可购买  1:线上及线下  2:只支持线上
     */
    @Column(name = "purchaseChannel")
    private Integer purchaseChannel;

    /**
     * 预约开始时间
     */
    @Column(name = "reservationBeginTime")
    private Date reservationBeginTime;

    /**
     * 预约结束时间
     */
    @Column(name = "reservationEndTime")
    private Date reservationEndTime;

    /**
     * 开售开始时间
     */
    @Column(name = "sellBeginTime")
    private Date sellBeginTime;

    /**
     * 开售结束时间
     */
    @Column(name = "sellEndTime")
    private Date sellEndTime;
    /**
     * 创建人
     */
    @Column(name = "createUserId")
    private String createUserId;
    /**
     * 创建时间
     */
    @Column(name = "createTime")
    private Date createTime;
    /**
     * 修改人
     */
    @Column(name = "updateUserId")
    private String updateUserId;

    /**
     * 修改时间
     */
    @Column(name = "updateTime")
    private Date updateTime;

    /**
     * 课程权益，多个用逗号分隔
     */
    @Column(name = "ability")
    private String ability;
    
    /**
     * 老师介绍
     */
    @Column(name = "content")
    private String content;

    /**
     * 销售数量：此数量=限制人数时不能再购买
     */
    @Column(name = "saleNum")
    private Integer saleNum;

    /**
     * 分类ID
     */
    @ApiModelProperty(value = "分类ID")
    @Column(name = "classifyId")
    private String classifyId;
    
    /**
     * 是否删除 1是 0否
     */
    @ApiModelProperty(value = "是否删除 1是 0否")
    @Column(name = "isDel")
    private Integer isDel;

    /**
     * 纬度
     */
    @Column(name = "latitude")
    private Double latitude;

    /**
     * 经度
     */
    @Column(name = "longitude")
    private Double longitude;

    /**
     * 详细地址名称
     */
    @Column(name = "address")
    private String address;

    /**
     * 排序
     */
    @Column(name = "sort")
    private Integer sort;
}